import Vue from 'vue';
import App from './App.vue';
import router from './router';
import store from './store';

import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import 'element-ui/lib/theme-chalk/display.css';

Vue.use(ElementUI);

import VueWechatTitle from 'vue-wechat-title'

Vue.use(VueWechatTitle)

import './assets/css/reset.less';
import './assets/css/public.less';
import './assets/icon/iconfont.css';

import './assets/utils/globalComponent';
import './assets/utils/filters';
import './assets/utils/highlight';

router.beforeEach((to, from, next) => {
  // 路由发生变化修改页面title
  if (to.meta.title) {
    document.title = to.meta.title;
  }
  next();
});

Vue.config.productionTip = false;

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app');
